led.bin: start.o led.o
	arm-linux-gnueabihf-ld -Ttext 0x87800000 $^ -o led.elf
	arm-linux-gnueabihf-objcopy -O binary led.elf $@
	arm-linux-gnueabihf-objdump -D led.elf > led.dis

%.o:%.c
	arm-linux-gnueabihf-gcc -c $< -o $@
%.o:%.s
	arm-linux-gnueabihf-gcc -c $< -o $@

clear:
	rm *.o led.elf led.dis led.bin